  /******************************************************************************
  * @file    PT32X005_wdg.h
  * @author  应用开发团队
  * @version V1.1.0
  * @date    2020/1/27
  * @brief    This file contains all the functions prototypes for the WDG firmware library.
  *
  ******************************************************************************
  * @attention
  *
  *
  *****************************************************************************/


/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PT32X005_WDG_H
#define PT32X005_WDG_H

#ifdef __cplusplus
 extern "C" {
#endif

/* Includes ------------------------------------------------------------------*/
#include "PT32X005.h"


/** @addtogroup WDG
  * @{
  */

/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
#define IS_WDG_ALL_PERIPH(PERIPH)     ((PERIPH) == IWDG)

/** @defgroup IS_WDG_LOCK_SEL **/
#define IS_WDG_LOCK_SEL(SEL)	(((SEL) == WDG_LOCK_UnLock) || \
								((SEL) == WDG_LOCK_Lock))

/** @defgroup IS_WDG_SR_SEL **/
#define IS_WDG_SR_SEL(SEL)		(((SEL) == IWDG_SR_HDF))

/** @defgroup IS_WDG_RLR_VAL **/
#define IS_WDG_RLR_VAL(Value) ((Value) <= 0xFFFFFFFF)


/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
void WDG_LockConfig(IWDG_TypeDef* WDGx, u32 WDG_WriteAccess);
FlagStatus WDG_GetLockStatus(IWDG_TypeDef* WDGx);
void WDG_SetReload(IWDG_TypeDef* WDGx, u32 Reload);
void WDG_ReloadCounter(IWDG_TypeDef* WDGx);
void WDG_Cmd(IWDG_TypeDef* WDGx, FunctionalState NewState);
FlagStatus WDG_GetFlagStatus(IWDG_TypeDef* WDGx, u16 WDG_FLAG);
ITStatus WDG_GetITStatus(IWDG_TypeDef* WDGx, u32 WDG_IT);
void WDG_ResetConfig(IWDG_TypeDef* WDGx, FunctionalState NewState);
void WDG_DbgPendingConfig(IWDG_TypeDef* WDGx, FunctionalState NewState);

/**
  * @}
  */


#ifdef __cplusplus
}
#endif

#endif



